package org.NooLab.compare.utilities.math;

import org.NooLab.compare.DataDomainGlobals;

 

abstract public class DistanceControlPropertiesDefaults 
												implements 
															DataDomainGlobals,
															DistanceControlPropertiesConstants{

	protected final static int _PLAIN    = _DD_SIMPLESET ; // item set
	protected final static int _VECTOR   = _DD_VECTOR ; // feature vector, or discrete series
	
	protected final static int _CONTEXT  = _DD_CONTEXT ; // context
	
	protected final static int _STRING   = _DD_STRING ; // string
	protected final static int _FREETEXT = _DD_FREETEXT ; // free text 
	protected final static int _IMAGE    = _DD_IMAGE ; // image

	// parameters for the distances based on the feature vector 

	protected int distanceMethod   = __distanceSPELA ;
	protected int setSimMethod     = __setsimilarityTVERSKY ;
	protected int contextSimMethod = __contextmatchSIMPLE ;
	
	/** given the maximal possible distance given vector1 is the base vector */
	protected boolean relativeDistances = false ;
	/** normalized by position, for contexts where vectors are of different length */
	protected boolean normalizedDistances = false ;
	/** if we are sure that vectors are aligned, we enforce bypass of the check;
	 * for long vectors this saves quite some efforts */
	protected boolean bypassVectorAlignCheck = false; 
	
	/** adds a fixed value to the distance for each missing position */
	protected double mvSurrogateDistance    = __MV_SurrogateDistance ;
	/** adds an adjusted value for each missing position, adjustment by number of fields (dimensions, features) */
	protected int missingValueHandling      = __MV_ByAdjSurrogateDistance;
	
	// this will be used only if missing values are treated in the item set domains 
	protected double mvItemSetContrastalpha = __MV_ItemSetContrastalpha ;
	protected double mvItemSetContrastbeta  = __MV_ItemSetContrastbeta  ;
	protected double mvItemSetContrastsigma = __MV_ItemSetContrastsigma  ; // for the union term
	
	
	// parameters for the distances based on item sets
	
	protected int itemSetContrast           = __IS_Contrast ;       // see Tversky 
	protected int itemSetContrastRatio      = __IS_ContrastRatio ;  //
	protected int itemSetContrastOther      = __IS_OTHER_ID ;       //
	protected String itemSetContrastOtherLabel = __IS_OTHER_LABEL ; //

	// other parameters as an array of parameters 
	protected double[] __IS_ItemSetContrastgamma  ;
	
	/*
	 * ATTENTION : when adding new features, don't forget to add them also to the constructor of the properties
	 *             otherwise hte cloning will not be complete !!!  
	 */
	
	
	public int getDistanceMethod() {
		return distanceMethod;
	}

	public void setDistanceMethod(int distanceMethod) {
		this.distanceMethod = distanceMethod;
	}


	
	public int getSetSimMethod() {
		return setSimMethod;
	}

	public void setSetSimMethod(int setSimMethod) {
		this.setSimMethod = setSimMethod;
	}

	public int getContextSimMethod() {
		return contextSimMethod;
	}

	public void setContextSimMethod(int contextSimMethod) {
		this.contextSimMethod = contextSimMethod;
	}

	public int getMissingValueHandling() {
		return missingValueHandling;
	}

	public void setMissingValueHandling(int missingValueHandling) {
		this.missingValueHandling = missingValueHandling;
	}

	
	public double getMvItemSetContrastsigma() {
		return mvItemSetContrastsigma;
	}

	public void setMvItemSetContrastsigma(double mvItemSetContrastsigma) {
		this.mvItemSetContrastsigma = mvItemSetContrastsigma;
	}

	public double getMvItemSetContrastalpha() {
		return mvItemSetContrastalpha;
	}
	public void setMvItemSetContrastalpha(double itemSetContrastalpha) {
		this.mvItemSetContrastalpha = itemSetContrastalpha;
	}
	
	
	public double getMvItemSetContrastbeta() {
		return mvItemSetContrastbeta;
	}
	public void setMvItemSetContrastbeta(double itemSetContrastbeta) {
		this.mvItemSetContrastbeta = itemSetContrastbeta;
	}
	
	
	public double getSurrogateDistance() {
		return mvSurrogateDistance;
	}


	public void setSurrogateDistance(double surrogateDistance) {
		this.mvSurrogateDistance = surrogateDistance;
	}

	public boolean isRelativeDistances() {
		return relativeDistances;
	}
	public boolean getRelativeDistances() {
		return relativeDistances;
	}

	public void setRelativeDistances(boolean relativeDistances) {
		this.relativeDistances = relativeDistances;
	}
	/** indicator whether distance should be normalized by length of vector */
	public boolean isNormalizedDistances() {
		return normalizedDistances;
	}
	/** indicator whether distance should be normalized by length of vector */
	public boolean getNormalizedDistances() {
		return normalizedDistances;
	}
	/** indicator whether distance should be normalized by length of vector */
	public void setNormalizedDistances(boolean normalizedDistances) {
		this.normalizedDistances = normalizedDistances;
	}

	public boolean isBypassVectorAlignCheck() {
		return bypassVectorAlignCheck;
	}
	public boolean getBypassVectorAlignCheck() {
		return bypassVectorAlignCheck;
	}

	public void setBypassVectorAlignCheck(boolean bypassVectorAlignCheck) {
		this.bypassVectorAlignCheck = bypassVectorAlignCheck;
	}

	public int getItemSetContrast() {
		return itemSetContrast;
	}

	public void setItemSetContrast(int itemSetContrast) {
		this.itemSetContrast = itemSetContrast;
	}

	public int getItemSetContrastOther() {
		return itemSetContrastOther;
	}

	public void setItemSetContrastOther(int itemSetContrastOther) {
		this.itemSetContrastOther = itemSetContrastOther;
	}

	public int getItemSetContrastRatio() {
		return itemSetContrastRatio;
	}

	public void setItemSetContrastRatio(int itemSetContrastRatio) {
		this.itemSetContrastRatio = itemSetContrastRatio;
	}

	public String getItemSetContrastOtherLabel() {
		return itemSetContrastOtherLabel;
	}

	public void setItemSetContrastOtherLabel(String itemSetContrastOtherLabel) {
		this.itemSetContrastOtherLabel = itemSetContrastOtherLabel;
	}
	
}
